﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Goldlight.Mvvm.Base;
using System.ComponentModel.Composition.Hosting;

namespace Goldlight.SampleApplication.ViewModels
{
    public class MainWindowViewModelBase : EditableViewModelBase
    {
        private bool _isCurrentWindow;

        /// <summary>
        /// Initialize a new instance of <see cref="MainWindowViewModelBase"/>.
        /// </summary>
        public MainWindowViewModelBase() : base() {}

        protected override void OnInitialize()
        {
            base.OnInitialize();
            IsCloseable = false;
        }

        /// <summary>
        /// Is this the current window?
        /// </summary>
        public bool IsCurrentWindow
        {
            get
            {
                return _isCurrentWindow;
            }
            set
            {
                if (_isCurrentWindow != value)
                {
                    _isCurrentWindow = value;
                    OnChanged(() => IsCurrentWindow);
                }
            }
        }
    }
}
